<%@ taglib uri="/WEB-INF/struts-html.tld" prefix="html"%>
<%@ taglib uri="/WEB-INF/displaytag.tld" prefix="display"%>
<%@ taglib uri="/WEB-INF/struts-logic.tld" prefix="logic"%>
<%@ taglib uri="/WEB-INF/struts-bean.tld" prefix="bean"%>
<%@ page contentType="text/html;charset=utf-8"%>
<%@page import="com.cs.beneficios.common.ConnectionFactory,com.cs.beneficios.common.entity.Consultas,java.sql.Connection,java.sql.ResultSet,java.sql.SQLException,com.cs.beneficios.common.entity.database"%>
<html>
  <head>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
    <title>untitled</title>
    <script language="javascript">
    
    function setValues(Codigo, Nombre)
         {
        opener.document.frmIngresarSede.codsede.value = Codigo ;
        opener.document.frmIngresarSede.subsede.value = Nombre;
        window.close();                 
         }
      function fBuscar(){
        document.frmBuscarSede.submit();
        }
    
    </script>
  </head>
  <body>
  <link href="<%= request.getContextPath() + "/css/bloques.css" %>" rel="stylesheet" type="text/css">
    <P></P>
    <P align="center">&nbsp;</P>
    <table cellspacing="1" cellpadding="2" border="0" width="80%" align="center">
      <tr>
        <td>
          <DIV align="center" class="titulosenblanco">ADMINISTRACION DE SEDES</DIV>
        </td>
      </tr>
    </table>
    <P align="center"></P>
    
    
    <form name="frmBuscarSede" method="POST" action="<%= request.getContextPath() + "/Sedes/ConsultarSubSede.do" %>">
      <table cellspacing="3" cellpadding="3" border="0" width="80%" align="center">
        <tr>
          <td width="2%">&nbsp;</td>
          <td width="8%" class="celdatabla">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</td>
          <td width="2%">&nbsp;</td>
          <td width="2%">&nbsp;</td>
          <td width="2%">&nbsp;</td>
          <td width="8%" class="celdatabla">
            <STRONG>Nombre</STRONG> 
          </td>
          <td width="76%" colspan="2">
            <input type="text" class="form" name="Sede" maxlength="50" size="50"/>
          </td>
        </tr>
        <tr>
          <td width="2%">&nbsp;</td>
          <td width="8%">&nbsp;</td>
          <td width="2%">&nbsp;</td>
          <td width="2%">&nbsp;</td>
          <td width="2%">&nbsp;</td>
          <td width="8%">&nbsp;</td>
          <td width="76%" colspan="2">&nbsp;</td>
        </tr>
        <tr>
          <td width="2%">&nbsp;</td>
          <td width="8%">&nbsp;</td>
          <td width="2%">
            <DIV align="center">&nbsp;</DIV>
          </td>
          <td width="2%">&nbsp;</td>
          <td width="2%">&nbsp;</td>
          <td width="8%">&nbsp;
          </td>
          <td width="47%">&nbsp;
            
            <input type="button" value="Buscar" onclick="fBuscar()"/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<input type="HIDDEN" name="ori" value="">
          </td>
          <td width="31%"/>
        </tr>
      </table>
   
   <table  cellspacing="3" cellpadding="2" border="0" width="90%" align="center">
    <tr>
    <td>
    <logic:notPresent scope="request" name="sedes">
        <logic:present scope="request" name="msg">
        <DIV align="center"><%=request.getAttribute("msg")%></DIV>
        </logic:present>
    </logic:notPresent>
  
    <logic:present scope="request" name="sedes"> 
        <display:table name="requestScope.sedes"  requestURI='<%= request.getContextPath() + "/Sedes/ConsultarSedes.do" %>' class="bordesTable" pagesize="20" id="sede" cellpadding="3" cellspacing="1"  style="width:100%">
            <display:column headerClass="headerTable" title="Codigo" class="Numero" sortable="false">
                <bean:write name="sede" property="code" /> 
            </display:column>
         <display:column headerClass="headerTable" title="Sede" class="Numero">
            <bean:write name="sede" property="nombre" />
          </display:column>	
          <bean:define id="Codigo" name="sede" property="code"></bean:define>
          <bean:define id="Nombre" name="sede" property="nombre"></bean:define>
          <display:column headerClass="headerTable" title="Seleccionar" class="Numero">
             <input type="radio" name="seleccionar" onclick='setValues("<%=Codigo%>","<%=Nombre%>")'>     
          </display:column>	
        </display:table>
      </logic:present>
      </td>
    </tr>
  </table>
   
    </form>
    <P align="center">&nbsp;</P>
  </body>
</html>
